import http from "@/utils/http";

export function createRoom(data) {
  return http({
    url: "/room/create",
    method: "post",
    data,
  });
}

export function queryPublicRoomList(data) {
  return http({
    url: "/room/public",
    method: "get",
    params: data,
  });
}

export function queryOwnerRoomList(data) {
  return http({
    url: "/room/owner",
    method: "get",
    params: data,
  });
}

export function queryRoomById(roomId) {
  return http({
    url: `/room/${roomId}/query`,
    method: "get",
  });
}

export function editRoom(data){
  return http({
    url: `/room/edit`,
    method: 'post',
    data
  })
}

export function dismissRoom(roomId) {
  return http({
    url: `room/${roomId}/dismiss`,
    method: 'post'
  })
}

export function verifyPassword(data){
  return http({
    url: `/room/verify`,
    method: 'post',
    data
  })
}
